# -*- mode: python -*-
# vi: set ft=python :

# Copyright 2020-2023 Massachusetts Institute of Technology.
# Licensed under the BSD 3-Clause License. See LICENSE.TXT for details.

load("//htmlbook/tools/python:defs.bzl", "rt_py_library", "rt_py_test")

rt_py_library(
    name = "manipulation",
    srcs = [
        "__init__.py",
        "utils.py",
    ],
    imports = [".."],
    visibility = ["//visibility:public"],
)

rt_py_library(
    name = "meshcat_utils",
    srcs = ["meshcat_utils.py"],
    imports = [".."],
    visibility = ["//visibility:public"],
)

rt_py_library(
    name = "mustard_depth_camera_example",
    srcs = ["mustard_depth_camera_example.py"],
    imports = [".."],
    visibility = ["//visibility:public"],
    deps = [
      "scenarios",
    ],
)

rt_py_library(
    name = "scenarios",
    data = ["//manipulation/models"],
    deps = ["//manipulation"],
    srcs = ["scenarios.py"],
    imports = [".."],
    visibility = ["//visibility:public"],
)

rt_py_library(
    name = "station",
    deps = [
      "//manipulation",
      "scenarios",
    ],
    srcs = ["station.py"],
    imports = [".."],
    visibility = ["//visibility:public"],
)

rt_py_library(
    name = "pick",
    srcs = ["pick.py"],
    imports = [".."],
    visibility = ["//visibility:public"],
)

# TODO(russt): Rename this to pose.py
rt_py_library(
    name = "icp",
    srcs = ["icp.py"],
    imports = [".."],
    visibility = ["//visibility:public"],
)

rt_py_library(
    name = "clutter",
    srcs = ["clutter.py"],
    imports = [".."],
    visibility = ["//visibility:public"],
)

rt_py_test(
    name = "test_create_sdf_from_mesh",
    srcs = [
        "test/test_create_sdf_from_mesh.py",
        "//manipulation:create_sdf_from_mesh.py",
    ],
    imports = [".."],
    deps = ["manipulation"],
)

rt_py_test(
    name = "test_gym",
    data = ["//manipulation:models"],
    srcs = ["test/test_gym.py"],
    imports = [".."],
    deps = [
      "//manipulation/envs:box_flipup",
      "manipulation",
      "scenarios",
    ],
)

rt_py_test(
    name = "test_meshcat_utils",
    srcs = ["test/test_meshcat_utils.py"],
    tags = ["requires-network"], # For gurobi
    imports = [".."],
    deps = [
      "manipulation",
      "//manipulation:meshcat_utils",
    ],
)

rt_py_test(
    name = "test_model_directives",
    srcs = ["test/test_model_directives.py"],
    data = ["//manipulation:models"],
    imports = [".."],
    deps = ["manipulation"],
)

rt_py_test(
    name = "test_utils",
    srcs = ["test/test_utils.py"],
    imports = [".."],
    deps = [
      "manipulation",
      "mustard_depth_camera_example",
    ],
)


